//
//  ShareChooseTableViewCell.m
//  SXH
//
//  Created by 龚啸 on 16/2/19.
//  Copyright © 2016年 lyss. All rights reserved.
//

#import "ShareChooseTableViewCell.h"
#import "DBManager.h"
@implementation ShareChooseTableViewCell

- (void)awakeFromNib {
    // Initialization code
    self.backgroundColor = [UIColor colorWithRed:0.114 green:0.051 blue:0.208 alpha:1.00];
    _cornerView.layer.cornerRadius = 5;
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
-(void)setShareModel:(ShareModel *)shareModel
{
   
    _shareModel = shareModel;
//    NSTimeZone* GTMzone = [NSTimeZone timeZoneForSecondsFromGMT:0];
////     NSTimeZone* localzone = [NSTimeZone localTimeZone];
//    NSDateFormatter *formatter = [[NSDateFormatter alloc]init];
//    [formatter setDateFormat:@"HH小时mm分钟"];
//    [formatter setTimeZone:GTMzone];
//    NSDateFormatter *fom = [[NSDateFormatter alloc] init];
//    [fom setDateFormat:@"MM-dd"];
//    [fom setTimeZone:GTMzone];
//    NSDate*now = [NSDate date];
//     NSTimeInterval secondsInterval= [now timeIntervalSinceDate:shareModel.createTime];
//    NSTimeInterval twoFour = 24*60*60;
//      NSTimeInterval k = twoFour - secondsInterval;
//    NSDate *remainDate = [NSDate dateWithTimeIntervalSince1970:k];
//  
//    DebugLog(@"==============%f",k);
//   
//    
//    NSLog(@"secondsInterval=  %lf",secondsInterval);
    
    _createdDay.text = [NSString stringWithFormat:@"%@ 创建/次日销毁",shareModel.createTime];
//    _remainTime.text = [formatter stringFromDate:remainDate];
    _labelTitle.text = [NSString stringWithFormat:@"房间（口令：%@）",shareModel.room_id];
    
}
@end
